Referring to FIG. 1, a conventional optical module 9 includes a circuit board 91, a chip 92, a bracket 93, and an optical component 94. The chip 92 is disposed on the circuit board 91. The bracket 93 is disposed on the circuit board 91 and surrounds the chip 92. The optical component 94 is disposed on the bracket 93. The chip 92 can be selected from a light-emitting chip or a light-sensing chip. When the light-emitting chip is adopted as the chip 92, the optical component 94 is selected from a lens that has concentration, homogenization, or filtering effect according to particular implementations. When the light-sensing chip is adopted as the chip 92, the light collection effect or the light guiding path needs to be considered so that a prism, a condenser lens or the like can be selected as the optical component 94. The kind of the optical component 94 selected seriously influences the performance of the optical module 9.
The conventional optical module 9 has been used in various fields, such as lighting module of a portable electronic device, light source of an indicator light, or light sensing module for a fingerprint identifier. In conventional operation, the optical module 9 is inevitably shaken or collided with, causing the optical component 94 to gradually loosen or even slip out of the bracket 93. However, the conventional optical module 9 does not have any design for detecting whether the optical component 94 has detached or not, hence necessitating improvement in the relevant art.